-- GENERATED SPELL FOR [Fordragon Marksman] --


function spell0_27540(pUnit, Event) --@Exploding Shot,n/a--
pUnit:FullCastSpellOnTarget(7896,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27540', 1000, 1)
end

function spell1_27540(pUnit, Event) --@Rapid Shot,Self--
pUnit:FullCastSpellOnTarget(49474,pUnit)
pUnit:RegisterEvent('Sorts_27540', 8000, 1)
end

function spell2_27540(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(32103,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27540', 530, 1)
end

function Sorts_27540(pUnit, Event)
local choix_sorts_27540 = math.random(0, 2)
if choix_sorts_27540 == 0 then
pUnit:RegisterEvent('spell0_27540', 1, 1)
end
if choix_sorts_27540 == 1 then
pUnit:RegisterEvent('spell1_27540', 1, 1)
end
if choix_sorts_27540 == 2 then
pUnit:RegisterEvent('spell2_27540', 1, 1)
end
end

function mob27540_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27540', math.random(1500, 3000), 1)
end

function mob27540_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27540_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27540_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27540, 1, 'mob27540_Action')
RegisterUnitEvent(27540, 2, 'mob27540_Leave')
RegisterUnitEvent(27540, 3, 'mob27540_Kill')
RegisterUnitEvent(27540, 4, 'mob27540_Die')
